import fetch from '@/axios/fetch'

export function getList(obj) {
  return fetch({
    url: '/api/trans/list',
    method: 'post',
    data: obj
  })
}


export function add(obj) {
  return fetch({
    url: '/api/trans/add?directoryId=' + obj,
    method: 'post'
  })
}

export function rename(obj) {
  return fetch({
    url: '/api/trans/rename',
    method: 'post',
    data: obj
  })
}

export function deleteTrans(obj) {
  return fetch({
    url: '/api/trans/delete/' + obj,
    method: 'delete',
  })
}

export function getSteps() {
  return fetch({
    url: '/api/trans/steps',
    method: 'get'
  })
}


export function transformationList(obj) {
  return fetch({
    url: '/api/trans/list',
    method: 'post',
    data: obj
  })
}


export function edit(obj) {
  return fetch({
    url: '/api/trans/edit',
    method: 'put',
    data: obj
  })
}

export function saveTrans(obj) {
  return fetch({
    url: '/api/trans/saveTrans',
    method: 'post',
    data: obj
  })
}

export function getTransformation(obj) {
  return fetch({
    url: '/api/trans/getTransformation',
    method: 'post',
    data: obj
  })
}


export function addStep(obj) {
  return fetch({
    url: '/api/trans/addStep',
    method: 'post',
    data: obj
  })
}
